// ************************************************************************
// Facades classes for ADO.NET Extension...
// ************************************************************************
namespace DAL.BetpointAdvanced.BNL.ADO.Facades
{
    using GrayParrot.Core.Data;
	using GrayParrot.Data.ADONET;
	using DAL.BetpointAdvanced.BNL.ADO.Repositories;

    public interface IFacadeBase
    {
        void Initialize();
        void Dispose();
    }

    public partial class BNL_ElencoCodici3DSecureFacade : GrayParrot.Data.ADONET.FacadeBase<BNL_ElencoCodici3DSecureFacade>
    {
	    private BNL_ElencoCodici3DSecureRepository m_repository = null;
		private DbContext m_context = null;
		private DbConnectionFactory m_factory = null;
	    private IUnitOfWork m_unitOfWork = null;

		public BNL_ElencoCodici3DSecureRepository Repository { get { return m_repository; } }

        public BNL_ElencoCodici3DSecureFacade()
        {
        }

        public override void Initialize()
        {
            m_factory = new DbConnectionFactory("BetpointAdvancedCn");

            // during start of the current session
            m_context = new DbContext(m_factory);

			m_repository = new BNL_ElencoCodici3DSecureRepository(m_context);
        }

		public override void Initialize(IDbContext context)
        {
		    m_repository = new BNL_ElencoCodici3DSecureRepository((DbContext)context);
        }

		public override void Dispose()
        {
		    if(m_factory != null)
			{
			   m_factory = null;
			}

            if (m_context != null)
            {
                m_context.Dispose();

                m_repository = null;
            }
        }
	}
    public partial class BNL_ReportTransazioniFacade : GrayParrot.Data.ADONET.FacadeBase<BNL_ReportTransazioniFacade>
    {
	    private BNL_ReportTransazioniRepository m_repository = null;
		private DbContext m_context = null;
		private DbConnectionFactory m_factory = null;
	    private IUnitOfWork m_unitOfWork = null;

		public BNL_ReportTransazioniRepository Repository { get { return m_repository; } }

        public BNL_ReportTransazioniFacade()
        {
        }

        public override void Initialize()
        {
            m_factory = new DbConnectionFactory("BetpointAdvancedCn");

            // during start of the current session
            m_context = new DbContext(m_factory);

			m_repository = new BNL_ReportTransazioniRepository(m_context);
        }

		public override void Initialize(IDbContext context)
        {
		    m_repository = new BNL_ReportTransazioniRepository((DbContext)context);
        }

		public override void Dispose()
        {
		    if(m_factory != null)
			{
			   m_factory = null;
			}

            if (m_context != null)
            {
                m_context.Dispose();

                m_repository = null;
            }
        }
	}
    public partial class BNL_TransazioniFacade : GrayParrot.Data.ADONET.FacadeBase<BNL_TransazioniFacade>
    {
	    private BNL_TransazioniRepository m_repository = null;
		private DbContext m_context = null;
		private DbConnectionFactory m_factory = null;
	    private IUnitOfWork m_unitOfWork = null;

		public BNL_TransazioniRepository Repository { get { return m_repository; } }

        public BNL_TransazioniFacade()
        {
        }

        public override void Initialize()
        {
            m_factory = new DbConnectionFactory("BetpointAdvancedCn");

            // during start of the current session
            m_context = new DbContext(m_factory);

			m_repository = new BNL_TransazioniRepository(m_context);
        }

		public override void Initialize(IDbContext context)
        {
		    m_repository = new BNL_TransazioniRepository((DbContext)context);
        }

		public override void Dispose()
        {
		    if(m_factory != null)
			{
			   m_factory = null;
			}

            if (m_context != null)
            {
                m_context.Dispose();

                m_repository = null;
            }
        }
	}
}

